package com.sunyard.dal.dto;

import com.sunyard.dal.entity.OtherParam;
import com.sunyard.utils.manage.DateUtil;
import lombok.Data;

/**
 * @author xin.qi
 * @Classname OtherParamDTO
 * @Description TODO
 * @Date 2020/1/15 19:20
 */
@Data
public class OtherParamDTO extends OtherParam {
    private static final long serialVersionUID = -7732239002864299130L;

    private static final String LOGIN_FAILURE_TIMES = "loginFailureTimes";

    private static final String QR_CODE_REDIRECT = "qrCodeRedirect";

    private static final String SESSION_FAILURE_TIME = "sessionFailureTime";

    private static final String AUDIT_SWITCH = "allFunctionsAuditSwitch";

    private static final String STRIP_LINE_SWITCH = "allFunctionsStripLineSwitch";

    private static final String YES = "0";

    private static final String NO = "1";

    //审核状态
    private String auditStatus;

    private String updateDatetime;

    @Override
    public String getConfValue() {
        if (AUDIT_SWITCH.equals(super.getConfKey()) || STRIP_LINE_SWITCH.equals(super.getConfKey())) {
            if (YES.equals(super.getConfValue())) {
                return "是";
            } else if (NO.equals(super.getConfValue())) {
                return "否";
            } else {
                return super.getConfValue();
            }
        } else {
            return super.getConfValue();
        }
    }

//    @Override
//    public void setUpdateDatetime(String updateDatetime) {
//        this.updateDatetime = DateUtil.getDateStr(DateUtil.YYYYMMDD_HHMMSS,DateUtil.getDefaultDate(updateDatetime));
//    }
}
